package org.chen.model.service.impl;

import java.util.List;
import java.util.Map;

import org.chen.model.dao.RolesMapper;
import org.chen.model.entity.Roles;
import org.chen.model.service.RolesService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class RolesServiceImpl implements RolesService {

	private RolesMapper rolesMapper;

	@Override
	public Integer add(Roles t) {
		return rolesMapper.insertSelective(t);
	}

	@Override
	public Integer update(Roles t) {
		return rolesMapper.updateByPrimaryKeySelective(t);
	}

	@Override
	public Integer delete(Integer id) {
		return rolesMapper.deleteByPrimaryKey(id);
	}

	@Override
	public Roles queryById(Integer id) {
		return rolesMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<Roles> query() {
		return rolesMapper.query();
	}

	@Override
	public Long queryRowCount() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Roles> queryByPage(Map<String, Object> pageMap) {
		// TODO Auto-generated method stub
		return null;
	}

}
